package main

import "fmt"

func main(){

	personMap := make(map[int]Person)
	person := Person{"vanyar", 21}
	personMap[1] = person


	fmt.Println(&personMap)
	//fmt.Println(&personMap[1])

	personMap[1] = person
	personMap[1].sayHi()
	/*fmt.Println(&personMap)
		fmt.Println("--------------")*/
}
type Person struct {
	name string
	age int
}
func (p *Person) sayHi() {
	fmt.Printf("SayHi -- This is %s, my age is %d\n",p.name, p.age)
}
func (p *Person) ModifyAge(age int) {
	fmt.Printf("ModifyAge")
	p.age = age
}


/*	fmt.Printf("person<%s:%d>\n", person.name, person.age)
	person.sayHi()
	person.ModifyAge(210)
	person.sayHi()*/